package com.blb.thread;
 class Thread1 implements Runnable{
    @Override
    public void run() {
        for(int i=1;i<=10;i++){
            if(i%2==0){
                System.out.println(Thread.currentThread().getName()+"----------->"+i);
            }
        }
    }
}
class Thread2 implements Runnable{

    @Override
    public void run() {
        for(int i=1;i<=10;i++){
            if(i%2!=0){
                System.out.println(Thread.currentThread().getName()+"------------>"+i);
            }
        }
    }
}

public class Test1 {

    public static void main(String[] args) {
               Thread thread1=new Thread(new Thread1());
               Thread thread2=new Thread(new Thread2());
               thread2.setPriority(Thread.MAX_PRIORITY);
               thread1.setPriority(Thread.MIN_PRIORITY);
               thread1.start();
               thread2.start();
    }




}

